package core2.a7.b1;

import com.sun.openpisces.Renderer;

import javax.swing.*;
import java.awt.*;
import java.awt.geom.AffineTransform;

/**
 * @author yuan
 */
public class Main {
    Graphics2D g2;
    public void paintComponet(Graphics g) {
        Graphics2D g2 = (Graphics2D) g;
    }
    public void main() {
        RenderingHints hints =  ...; // 绘图提示
        g2.setRenderingHint(hints);
        Stroke stroke = new BasicStroke(); // 笔划
        g2.setStroke(stroke);
        Paint paint = ...; // 涂色
        g2.setPaint(paint);
        Shape clip = new ...; // 剪切
        g2.clip(clip);
        AffineTransform transform = new AffineTransform(); //仿射变换
        g2.transform(transform);
        Composite composite = ...; // 组合规则
        g2.setComposite(composite);
        Shape shape = new ...
        g2.draw(shape);
        g2.fill(shape);
        // 有默认设置
    }
    public static void main(String[] args) {

    }
}
